id | title | description |
---|---|---|
auth-linkedin |
Login with LinkedIn |
Add LinkedIn OAuth to your Supabase project |
To enable LinkedIn Auth for your project, you need to set up a LinkedIn OAuth application and add the application credentials to your Supabase Dashboard.
We will be replacing the existing LinkedIn provider with a new LinkedIn (OIDC) provider. Developers with LinkedIn OAuth Applications created prior to 1st August 2023 should create a new OAuth application and migrate their credentials from the LinkedIn provider to the LinkedIn (OIDC) provider. Alternatively, you can also add the newly released Sign In with LinkedIn using OpenID Connect
to your existing OAuth application. Read this section to find out more.
Setting up LinkedIn logins for your application consists of 3 parts:
- Create and configure a LinkedIn Project and App on the LinkedIn Developer Dashboard.
- Add your LinkedIn (OIDC)
client_id
andclient_secret
to your Supabase Project. - Add the login code to your Supabase JS Client App.
- Go to LinkedIn Developer Dashboard.
- Log in (if necessary.)
- Go to LinkedIn Developer Dashboard.
- Click on
Create App
at the top right - Enter your
LinkedIn Page
andApp Logo
- Save your app
- Click
Products
from the top menu - Look for
Sign In with LinkedIn using OpenID Connect
and click on Request Access - Click
Auth
from the top menu - Add your
Redirect URL
to theAuthorized Redirect URLs for your app
section - Copy and save your newly-generated
Client ID
- Copy and save your newly-generated
Client Secret
Ensure that the appropriate scopes have been added under OAuth 2.0 Scopes at the bottom of the Auth
screen.
<Tabs scrollable size="small" type="underlined" defaultActiveId="js" queryGroup="language"
When your user signs in, call signInWithOAuth() with linkedin_oidc
as the provider
:
async function signInWithLinkedIn() {
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'linkedin_oidc',
})
}
When your user signs in, call signInWith(Provider) with LinkedIn
as the Provider
:
suspend fun signInWithKaLinkedIn() {
supabase.auth.signInWith(LinkedIn)
}
<Tabs scrollable size="small" type="underlined" defaultActiveId="js" queryGroup="language"
When your user signs out, call signOut() to remove them from the browser session and any objects from localStorage:
async function signOut() {
const { error } = await supabase.auth.signOut()
}
When your user signs out, call logout() to remove them from the browser session and any objects from localStorage:
suspend fun signOut() {
supabase.auth.signOut()
}
We will be replacing the LinkedIn provider with a new LinkedIn (OIDC) provider to support recent changes to the LinkedIn OAuth APIs. The new provider utilizes the Open ID Connect standard. In view of this change, we have disabled edits on the LinkedIn provider and will be removing it effective 4th January 2024. Developers with LinkedIn OAuth Applications created prior to 1st August 2023 should create a new OAuth application via the steps outlined above and migrate their credentials from the LinkedIn provider to the LinkedIn (OIDC) provider. Alternatively, you can also head to the Products
section and add the newly releaseSign In with LinkedIn using OpenID Connect
to your existing OAuth application.
Developers using the Supabase CLI to test their LinkedIn OAuth application should also update their config.toml
to make use of the new provider:
[auth.external.linkedin_oidc]
enabled = true
client_id = ...
secret = ...
Do reach out to support if you have any concerns around this change.